<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 
        1、使用static关键字修饰的变量,叫静态属性。只能通过类名来调用
        2、使用static关键字修饰的方法,叫静态方法
         */
         class Http{
            static baseUrl = "https://www.yuque.com"
            static request(){
                console.log(this)
                console.log("request")
            }
        }
        var h =  new Http();
        console.log(Http.baseUrl)//https://www.yuque.com
        console.log(h.baseUrl)//undefined
    </script>
</body>
</html>